package com.broada.apm.util;

import com.broada.apm.cache.ErrorManager;
import com.broada.apm.cache.ProtocolDictManager;

public class CacheRefreshUtil {
	public static final int REFRESH_ERROR_CACHE = 2;
	public static final int REFRESH_PROTOCOL_CACHE = 1;

	public static void refresh(int type) {
		switch (type) {
		case REFRESH_PROTOCOL_CACHE:
			ProtocolDictManager.getInstance().reload();
			break;
		case REFRESH_ERROR_CACHE:
			ErrorManager.getInstance().reload();
			break;
		default:
			break;
		}
	}

}
